package com.coder.algorithm.search;

/**
 * 查找测试
 *
 * @author yuhushuan
 * @date 2020/6/7 23:16
 */
public class SearchTest {
    public static void main(String[] args) {
        Search search = new BinarySearch();

        int[] array = {1, 2, 3, 5, 7, 9, 11};
        int des = 7;

        int index = search.search(array, des);
        if (index >= 0) {
            System.out.println("找到 " + des + " 的下标为：" + index);
        } else {
            System.out.println("未找到 " + des);
        }
    }
}
